<!DOCTYPE html>
<html lang="en">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <meta property="wb:webmaster" content="572c54c2cc00c6fb" />
    <meta name="referrer" content="always">
    <title>
   密码修改
</title>
    
<style>
html{color:#111;background:#fff}body,div,dl,dt,dd,ul,li,h1,h2,h3,h4,h5,h6,pre,code,form,fieldset,legend,input,button,textarea,blockquote,p{margin:0;padding:0}table{border-collapse:collapse;border-spacing:0}fieldset,img{border:0}address,caption,cite,code,dfn,em,i,strong,th,var,optgroup{font-style:normal;font-weight:normal}ul,ol{list-style:none}caption,th{text-align:left}h1,h2,h3,h4,h5,h6{font-size:100%;font-weight:normal}q:before,q:after{content:""}abbr,acronym{border:0;font-variant:normal}sup{vertical-align:baseline}sub{vertical-align:baseline}legend{color:#000}input,button,textarea,select,optgroup,option{font-family:inherit;font-size:inherit;font-style:inherit;font-weight:inherit}input,button,textarea,select{*font-size:100%}pre{white-space:pre-wrap;word-wrap:break-word}a{cursor:pointer}a:link{color:#369;text-decoration:none}a:visited{color:#669;text-decoration:none}a:hover{color:#fff;text-decoration:none;background:#039}a:active{color:#fff;text-decoration:none;background:#f93}a img{border-width:0;vertical-align:middle}body,td,th{font:12px Helvetica,Arial,sans-serif;line-height:1.62}table{border-collapse:collapse;border:0;padding:0;margin:0}wbr:after{content:"\00200B"}textarea{resize:none}input[type=text]:focus,input[type=password]:focus,textarea:focus{outline:0}body{-webkit-text-size-adjust:none;-webkit-touch-callout:none;-webkit-tap-highlight-color:transparent}.bn-small,a.bn-cta,.bn-cta input,.bn-flat input{margin:0;border:0;background:transparent;cursor:pointer;-webkit-appearance:none}.lnk-flat,.bn-flat{display:inline-block;*display:inline;zoom:1;overflow:hidden;vertical-align:middle;color:#444;border-width:1px;border-style:solid;border-color:#bbb #bbb #999;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}.lnk-flat,.bn-flat input{height:2.1em;padding:0 1.16em 2px;line-height:2.2;*line-height:2.3;font-size:12px;cursor:pointer;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;background:url(https://img3.doubanio.com/f/accounts/23850eee993fea8be43be857dcbaa23961de56aa/pics/bn_ie_bg.png) repeat-x top;background-image:-webkit-gradient(linear,left top,left bottom,from(#fcfcfc),to(#e9e9e9));background-image:-webkit-linear-gradient(top,#fcfcfc,#e9e9e9);background-image:-moz-linear-gradient(top,#fcfcfc,#e9e9e9);background-image:-ms-linear-gradient(top,#fcfcfc,#e9e9e9);background-image:-o-linear-gradient(top,#fcfcfc,#e9e9e9);background-image:linear-gradient(top,#fcfcfc,#e9e9e9)}.lnk-flat:hover,.bn-flat input:hover,.bn-flat-over{color:#333;border-color:#999 #999 #666;background-color:transparent;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#f8f8f8',endColorstr='#dddddd',GradientType=0);background-image:-webkit-gradient(linear,left top,left bottom,from(#f8f8f8),to(#ddd));background-image:-webkit-linear-gradient(top,#f8f8f8,#ddd);background-image:-moz-linear-gradient(top,#f8f8f8,#ddd);background-image:-ms-linear-gradient(top,#f8f8f8,#ddd);background-image:-o-linear-gradient(top,#f8f8f8,#ddd);background-image:linear-gradient(top,#f8f8f8,#ddd)}.lnk-flat:active,.bn-flat input:active,.bn-flat-active input{color:#333;border-color:#999 #999 #666;background:#ddd}.lnk-flat{line-height:2.2em}.lnk-flat:link,.lnk-flat:visited{text-decoration:none}a.bn-cta,.bn-cta input{display:inline-block;padding:4px 20px;border:1px solid #528641;background:#3fa156;color:#fff;font-size:14px;letter-spacing:2px;*position:relative;*display:inline;zoom:1;*padding:6px 20px 4px;*line-height:1.2;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}a.bn-cta{vertical-align:middle}.bn-cta input{padding:5px 18px;*padding:4px 10px 2px;*vertical-align:middle}a.bn-cta:link,a.bn-cta:visited{color:#fff}.bn-cta input:hover,a.bn-cta:hover{background-color:#4fca6c;border-color:#6aad54}.bn-cta input:active,a.bn-cta:active{background-color:#3fa156;border-color:#528641}.bn-small{padding:1px 2px;border:1px solid #ffabab;color:#ff7676;background:#fdd;height:1.5em\9;line-height:1.56;*line-height:1.4;*position:relative;-webkit-appearance:none;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}a.bn-small:link,a.bn-small:visited,a.bn-small:hover,a.bn-small:active{padding:0 4px;line-height:1.8;font-size:12px;*line-height:1.3;zoom:1;*height:13px;*overflow:hidden;color:#ff7676;background:#fdd}a.bn-small:hover,a.bn-small:active{border-color:#ff7676;background-color:#ff7676;color:#fdd}.recsubmit .bn-flat{margin:0 10px}.basic-input,.basic-textarea{padding:5px;height:18px;font-size:14px;vertical-align:middle;border:1px solid #c9c9c9;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}.basic-input:focus,.basic-textarea:focus{border:1px solid #a9a9a9}.disabled-input{background:#eee;color:#999}.basic-textarea{height:auto}ul,ol{margin:0;padding:0}.wrapper,.header,.footer{width:950px;margin:0 auto 40px;overflow:hidden;zoom:1}.header{margin-bottom:40px}.article{float:left;width:590px;margin-right:50px}.aside{color:#666;overflow:hidden;zoom:1}.aside h2{font-size:15px;color:#072;margin:0 0 12px 0;line-height:150%}.single-nav{padding-top:30px}.sidenav{margin-top:1em}.sidenav li{margin-bottom:1em}h1{display:block;margin:0;padding:0 0 15px 0;font-size:25px;font-weight:bold;color:#494949;line-height:1.1}p{margin:1em 0}.site-nav-logo a:hover{background:0}
		*{padding: 0px;margin: 0px;list-style: none;}
		#small{
				width: 200px;
				height: 200px;
				position: absolute;
			
		}
		#big{
			width: 50px;
			height: 50px;
			position: absolute;
			
			/*margin-left: 10px;*/
			overflow: hidden;
			display: none;

		}
		#move{width: 100px;
			height: 100px;
			background: url(../images/bg.png);
			display: none;
			position: absolute;
			left: 0;
			top:0;
			}
		#bimg{position: absolute;}
		ul{
			width: 300px;height: 80px;
			position: absolute;top: 460px;left: 100px;
		}	
		li{
			width: 80px;height: 80px;float: left;
			border:dashed 1px blue;margin-right: 5px;
		}

</style>
    <link rel="stylesheet" href="/Css/570ee5ba6083274c.css">
</head>
<body>
	<!-- 头部 -->
	<div class="header">    
		<div id="header">
		  <div class="site-nav single-nav">
		    <div class="site-nav-logo">
		      <a href="https://www.douban.com/accounts/">
		          <img src="/Images/lg_account.png" alt="豆瓣">
		      </a>
		    </div>
		  </div>
		</div>
    </div>
	<!-- 头部结束 -->
	<!-- 中间部分 -->
	<div class="wrapper">
	    
	<h1>
	修改小花狗的密码
	</h1>
	    <div class="article">
	    <br><br>
	    <div style="padding-left:50px;">
	    <form name="lzform" method="get" action="/home/user/mmxg"><div style="display:none;"><input type="hidden" name="ck" value="i7_x"></div>
	    <input name="action" type="hidden" value="editpassword">
	    <div class="item">
	    <span class="m">当前密码：</span><br>
	    <input name="old_password" type="password" size="20" maxlength="20" class="basic-input old_mima">
	    </div>
	   		<tr>
				<td>新密码</td><br>
				<td><input type="password" name="pasd" readmin="请输入6-18密码" class="basic-input mima"><span></span></td>
			</tr><br>
			<tr>
				<td>确认密码</td><br>
				<td><input type="password" name="repasd" readmin="请确认密码" class="basic-input"><span></span></td>
			</tr>

		<br>
		<span class="bn-flat"><input class="butt" type="submit" value="确认修改密码"></span>
	    </form>
	    </div>
	    </div>
	    <div class="aside">
	      
	<br>
	<br>
	<h2>如何使密码更安全？</h2>
	<ol>
	  <li>使用标点符号、数字和大小写字母的组合作为密码。</li>
	  <li>密码中勿包含个人信息（如姓名、生日等）。</li>
	  <li>不使用和其他网站相同的密码。</li>
	  <li>定期修改密码。</li>
	</ol>
	<br>
	<p><a href="/accounts/resetpassword">&gt; 忘记密码</a></p>

	    </div>
	  </div>
	<!-- 中间部分结束 -->
	<!-- 尾部 -->
	<div class="footer">
		<div id="footer">
		<span id="icp" class="fleft gray-link">
		    © 2005－2016 douban.com, all rights reserved
		</span>
		<span class="fright">
		    <a href="https://www.douban.com/about">关于豆瓣</a>
		    · <a href="https://www.douban.com/jobs">在豆瓣工作</a>
		    · <a href="https://www.douban.com/about?topic=contactus">联系我们</a>
		    · <a href="https://www.douban.com/about?policy=disclaimer">免责声明</a>
		    
		    · <a href="https://www.douban.com/help/">帮助中心</a>
		    · <a href="https://developers.douban.com/" target="_blank">开发者</a>
		    · <a href="https://www.douban.com/mobile/">移动应用</a>
		    · <a href="https://www.douban.com/partner/">豆瓣广告</a>
		</span>
		</div>
    </div>
	<!-- 尾部结束 -->
	<!-- script -->
	<script type="text/javascript" src="/Scripts/jquery-1.8.3.min.js"></script>
	<script type="text/javascript">
	 $.ajaxSetup({
            headers: {
                'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
            }
    });
	// alert($);
	var CPASD=false;
	var CREPASD=false;
	$('input').focus(function(){
		// alert(2222);
		//获取readmin 的值
		var res=$(this).attr('readmin');
		// console.log(res);
		//赋值给span标签
		$(this).next().html(res).css('color','blue');
		$(this).css('border','1px solid blue');
	});
	//密码绑定丧失焦点事件
			$('input[name=pasd]').blur(function(){
				//获取密码；
				var pasd=$(this).val();
				// console.log(pasd);
				//正则
				var reg=/^\w{6,18}$/;
				var res=reg.test(pasd);
				if(res){
					//合法，修改css;
					$(this).next().html('ok').css('color','green');
					$(this).css('border','1px solid green');
					CPASD=true;
				}else{
					//不合法，修改css;
					$(this).next().html('密码不合法，请从新输入').css('color','red');
					$(this).css('border','1px solid red');
					CPASD=false;
				}

			});
			//重复密码 丧失焦点
			$('input[name=repasd]').blur(function(){

				//获取重复密码
				var repasd=$(this).val();
				//获取密码；
				var pasd=$('input[name=pasd]').val();
				// console.log(repasd,pasd);
				//判断密码是否相同
				if(repasd==''){
					$(this).next().html('密码不能为空').css('color','red');
					$(this).css('border','1px solid red');
					CREPASD=false;
					return false;
				}
				if(repasd==pasd){
					//合法，修改css;
					$(this).next().html('ok').css('color','green');
					$(this).css('border','1px solid green');
					CREPASD=true;
				}else{
					//不合法，修改css;
					$(this).next().html('两次密码不一样，请从新输入').css('color','red');
					$(this).css('border','1px solid red');
					CREPASD=false;
				}
			});
			$('.butt').click(function(){
	        var pasd = $(this).parents('form').find('.mima').val();
	        var pasdold = $(this).parents('form').find('.old_mima').val();
	        var dd = $(this);
	        $.get('/home/user/mmxg',{password:pasd,oldpasd:pasdold},function(data){
	         if(data == 1){
	                return window.location.assign("grxx");
	            }else if(data==3){
	                alert('初始密码不对');
	            }else if(data==2){
	            	alert('修改失败');
	            }else if(data==4){
	            	return window.location.assign("grxx");
	            	alert('请先登录');
	            }
	        })
	        return false;
	    });

	</script>
	
	<!-- script结束 -->
</body>
</html>